import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// 引入全局的css样式
import '@/assets/css/global.css'

// 引入阿里矢量图标
import '@/assets/font/iconfont.css'

// 引入axios并配置
import axios from 'axios'
// 使用elementUI第三方组件库
Vue.config.productionTip = false
// p配置请求的根路径
axios.defaults.baseURL = 'https://lianghj.top:8888/api/private/v1/'
axios.interceptors.request.use(config => {
  config.headers.Authorization = window.sessionStorage.getItem('Token')
  return config
})
Vue.prototype.$http = axios

Vue.use(ElementUI)

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
